package org.shs.waste.dao;

import java.util.ArrayList;

import org.shs.common.dao.IBaseDAO;
import org.shs.waste.form.WasteTypeForm;
import org.shs.waste.model.WasteTypeModel;

/**
 * 
 * <br/>
 * <br/><b>Created:</b>&nbsp;&nbsp; 19-Nov-2008 23:55:21
 *
 * @author anirvan
 *
 */
public interface IWasteDAO extends IBaseDAO
{
   
   /**
    * Retrieves the list of waste types and related information. This can also 
    * be a list of waste types based upon a search performed.
    * @param wasteTypeDesc The waste type desc [if searched upon]
    * @return The list of waste types
    * @throws Exception if query resulted in an error.
    */
   public ArrayList<WasteTypeModel> getWasteTypes(String wasteTypeDesc) 
   throws Exception;
   
   /**
    * Retrieves the details for a particular waste type
    * @param wasteTypeId The ID of the waste type
    * @return The model encapsulating all details about the waste type
    * @throws Exception if query resulted in an error.
    */
   public WasteTypeModel getWasteTypeDetails(String wasteTypeId) 
   throws Exception;
   
   /**
    * Retrieves the list of aggregate waste types
    * @return The list of aggregate waste types
    * @throws Exception if query resulted in an error.
    */
   public ArrayList<WasteTypeModel> getAggrWasteTypes() throws Exception;
   
   /**
    * Inserts details for a new waste type
    * @param wasteTypeData the details for the new waste type
    * @return The ID of the new waste type
    * @throws Exception if query resulted in an error.
    */
   public String addWasteTypeData(WasteTypeForm wasteTypeData) throws Exception;
   
   /**
    * Inserts details for a waste type into the history table
    * @param wasteTypeData the details of the waste types
    * @throws Exception if query resulted in an error.
    */
   public void addWasteTypeHistData(WasteTypeForm wasteTypeData) 
   throws Exception;
   
   /**
    * Updates the details for an existing waste type
    * @param wasteTypeData the details of the waste types
    * @throws Exception if query resulted in an error.
    */
   public void editWasteTypeData(WasteTypeForm wasteTypeData) throws Exception;
   
   /**
    * Deletes the waste type details
    * @param wasteTypeId ID of the waste type to be deleted
    * @throws Exception if query resulted in an error.
    */
   public void delWasteTypeData(String wasteTypeId) throws Exception;
}
